package com.picrepo.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;

/**
 * This class is used to filter string.
 * 
 * @author Vincent Cheung
 * @since  Apr. 17, 2014
 */
public class StringFilter
{
	public static String pattern(String str) throws PatternSyntaxException {
		String regEx = "[/\\:,.，。、！!：；‘’“”()~&@^#;*?<>|\'\"\n\t]";

		Pattern p = Pattern.compile(regEx);
		Matcher m = p.matcher(str);

		return m.replaceAll("");
	}
}
